package com.shop.project.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.shop.project.mapper.CartMapper;
import com.shop.project.domain.Cart;
import com.shop.project.service.ICartService;

@Service
public class CartServiceImpl implements ICartService 
{
    @Autowired
    private CartMapper cartMapper;

    @Override
    public Cart selectCartById(Long id)
    {
        return cartMapper.selectCartById(id);
    }

    @Override
    public List<Cart> selectCartList(Cart cart)
    {
        return cartMapper.selectCartList(cart);
    }

    @Override
    public int insertCart(Cart cart)
    {
        return cartMapper.insertCart(cart);
    }

    @Override
    public int updateCart(Cart cart)
    {
        return cartMapper.updateCart(cart);
    }

    @Override
    public int deleteCartByIds(Long[] ids)
    {
        return cartMapper.deleteCartByIds(ids);
    }

    @Override
    public int deleteCartById(Long id)
    {
        return cartMapper.deleteCartById(id);
    }
}
